Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Toc): add component #858

Merged
merged 4 commits into from
Sep 15, 2023
Merged

feat(Toc): add component #858

merged 4 commits into from
Sep 15, 2023

Conversation

chelentos
Copy link
Contributor

No description provided.

@chelentos chelentos force-pushed the chelentos/DATAUI-1588 branch from 07f6462 to c45cb01 Compare August 2, 2023 16:00
@chelentos chelentos closed this Aug 21, 2023
@chelentos chelentos reopened this Aug 22, 2023
@chelentos chelentos force-pushed the chelentos/DATAUI-1588 branch from c45cb01 to e6faddb Compare August 22, 2023 16:32
@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@amje amje self-assigned this Aug 29, 2023
@imechoim imechoim self-requested a review August 31, 2023 16:34
src/components/Toc/Toc.scss Outdated Show resolved Hide resolved
src/components/Toc/Toc.scss Outdated Show resolved Hide resolved
src/components/Toc/TocItem/TocItem.scss Outdated Show resolved Hide resolved
src/components/Toc/TocItem/TocItem.tsx Outdated Show resolved Hide resolved
src/components/Toc/types.ts Outdated Show resolved Hide resolved
src/components/Toc/types.ts Outdated Show resolved Hide resolved
@amje
Copy link
Contributor

amje commented Sep 2, 2023

Also I'd use <a> in item for better a11y

export const TocItem = (props: TocItemProps) => {
const {childItem = false, active = false, onClick, title, value} = props;

const handleClick = () => onClick(value);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, Wrap it in React.useCallback.

@chelentos chelentos force-pushed the chelentos/DATAUI-1588 branch from e6faddb to 42a116f Compare September 4, 2023 14:09
@chelentos chelentos force-pushed the chelentos/DATAUI-1588 branch from 4cdb8e3 to bd60842 Compare September 13, 2023 11:24
src/components/Toc/TocItem/TocItem.scss Show resolved Hide resolved
src/components/Toc/types.ts Outdated Show resolved Hide resolved
@amje amje changed the title feat(Toc): Toc component added feat(Toc): add component Sep 15, 2023
@chelentos chelentos merged commit bafed78 into main Sep 15, 2023
@chelentos chelentos deleted the chelentos/DATAUI-1588 branch September 15, 2023 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants